package com.example.demo.domain;

import java.io.Serializable;
import java.util.Date;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;

@Data
@Document(collection = "user_entity")
public class UserEntity implements Serializable {
    @Id
    private String id;

    private String name;

    private String age;

    @JsonFormat(shape = JsonFormat.Shape.NUMBER)
    private Date createTime;

    @Override
    public String toString() {
        return "UserEntity{" + "id=" + id + ", name='" + name + '\'' + ", age='" + age + '\'' + ", createTime="
            + createTime + '}';
    }
}
